package com.sfzd5.exam;

import android.app.Application;

import com.sfzd5.exam.helplibrary.exam.ExamInof;
import com.sfzd5.exam.helplibrary.exam.PostAnserResult;

import timber.log.Timber;

public class PApplication extends Application {

    public PostAnserResult result;

    public void setNewExamInfo(ExamInof examInfo){
        this.workProcess = new WorkProcess(examInfo);
    }
    private WorkProcess workProcess;

    public WorkProcess getWorkProcess() {
        return workProcess;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        if (BuildConfig.DEBUG) {
            Timber.plant(new FileLoggingTree(getCacheDir().toString()));
            //Timber.plant(new Timber.DebugTree());
        } else {
            Timber.plant(new FileLoggingTree(getCacheDir().toString()));
        }
        //Timber.d e i v w

        //初始化异常崩溃捕捉线程
        CrashHandler handler = new CrashHandler();
        Thread.setDefaultUncaughtExceptionHandler(handler);
    }

    public WsClient wsClient;

}
